Setup release workflow with trusted publisher#9852
Setup release workflow with trusted publisher#9852browniebroke merged 13 commits intoencode:mainfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
51d9dc5 to
0b8463c
Compare
I thought this would be a trivial change that didn't deserve its own pull request, but you having a differing viewpoint proved me that it's not that trivial, so I've moved this out of this change: Will be a better place to discuss it - will hide the previous comment as outdated from here to not pollute this PR |
|
Actually I should probably update the release process at the same time. Create pull request for [release notes](https://github.com/encode/django-rest-framework/blob/mains/docs/topics/release-notes.md) based on the [*.*.* milestone](https://github.com/encode/django-rest-framework/milestones/***).
Update supported versions:
Ensure the pull request increments the version to `*.*.*` in [`restframework/__init__.py`](https://github.com/encode/django-rest-framework/blob/main/rest_framework/__init__.py).
Ensure documentation validates
Confirm that release is finalized and ready to go.
Ensure that release date is included in pull request.
Merge the release pull request.
-Install the release tools: `pip install build twine`
-Build the package: `python -m build`
-Push the package to PyPI with `twine upload dist/*`
-Tag the release, with `git tag -a *.*.* -m 'version *.*.*'; git push --tags`.
-Deploy the documentation with `mkdocs gh-deploy`.
+Create the git tag
+Wait for the release workflow to run. It will build the distribution, upload it to Test PyPI, PyPI and create the GitHub release
Make a release announcement on the [discussion group](https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework).
-Make a release announcement on twitter.
+Make a release announcement on social media.
Close the milestone on GitHub.Edit: that's now done |
Following django-commons template
d8b422a to
d9d919d
Compare
|
@auvipy @peterthomassen I'm keen try get 3.17 released in the coming days and would like to try using this for it. I can't really test this until it's merged but it's pretty much the @django-commons template that's used on several projects, so should hopefully work 🤞🏻 |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions-based release workflow using PyPI “trusted publishing” (OIDC) and updates the release checklist docs to reflect the new automated publishing process.
Changes:
- Introduces a tag-triggered
release.ymlworkflow that builds artifacts, publishes to TestPyPI/PyPI, signs with Sigstore, and creates/uploads a GitHub Release. - Updates the release checklist in project management docs to align with the new workflow-driven release steps.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
docs/community/project-management.md |
Updates release checklist steps to rely on the new automated release workflow rather than manual twine/mkdocs gh-deploy steps. |
.github/workflows/release.yml |
Adds the automated build/publish/sign/release pipeline for tagged releases using trusted publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think I should also be invited to PyPI as an decade old contributor to DRF |
Fair enough. Done on PyPI and test PyPI - although this workflow is meant to remove the need to invite maintainers altogether |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Description
Following django-commons template. Trusted publisher has been configured in PyPI and Test PyPI.
Lifted out from #9782 to take advantage of it before the org move. It's time we make a new release, there are a number of unreleased changes, including a few which are making our updated upstream support official.